package org.raymond.iworks.study.basic.designpattern.composite;

import lombok.Getter;
import lombok.Setter;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
@Getter
@Setter
public abstract class OrganizationComponent {
    private String name;
    private String des;

    public OrganizationComponent(String name, String des){
        this.name = name;
        this.des = des;
    }

    protected void add(OrganizationComponent component){
        System.out.println("add 默认实现");
        throw new UnsupportedOperationException();
    }
    protected void remove(OrganizationComponent component){
        System.out.println("remove 默认实现");
        throw new UnsupportedOperationException();
    }
    abstract protected void print();
}
